﻿namespace Infrastructure.Common.Config
{
    public interface IConfigManage
    {
        /// <summary>
        ///     保存配置文件
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="entity">保存的实体</param>
        /// <param name="filePath">文件路径</param>
        /// <returns></returns>
        void Save<T>(T entity, string filePath);

        /// <summary>
        ///     加载配置文件
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="filePaht">文件路径</param>
        /// <param name="entity">保存的实体</param>
        /// <returns></returns>
        void Load<T>(string filePaht, out T entity);
    }
}